
namespace M0
{
    public class BaseSingle<T> where T:ISingle, new()
    {
        private static T _instance;
        public static T Instance{ get{
            if (_instance == null)
            {
                _instance = new T();
                _instance.Init();
            }
            return _instance;
        }}
    }

    public interface ISingle
    {
        void Init();
    }
}
